{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/UsedTruck/index')}">信息管理</a></li>
            <li class=""><a href="{:url('admin/UsedTruck/add')}">添加信息</a></li>
            <li class=""><a href="{:url('admin/UsedTruck/edit',['id'=>$usedtruck['id']])}">编辑信息</a></li>
            <li class="layui-this">查看信息</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" action="{:url('admin/UsedTruck/update')}" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">标题</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$usedtruck.title}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">车型</label>
                        <div class="layui-input-block">
                            <select name="pid[]" class="site" disabled>
                                <option value="0">车型</option>
                                {foreach name="used_list" item="vo"}
                                {if $vo.pid == 0 and $vo.cid == 1}
                                {foreach name='used_list' item='lo'}
                                {if $lo.pid[0] == $vo.id}
                                <option value="{$lo.id}" {if $usedtruck.type == $lo.id}selected="selected"{/if}>{$lo.name}</option>
                                {/if}
                                {/foreach}
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">品牌</label>
                        <div class="layui-input-block">
                            <select name="pid[]" class="site" disabled>
                                <option value="{$usedtruck.brand}">{$classify_list[$usedtruck['brand']]}</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">车系</label>
                        <div class="layui-input-block">
                            <select name="pid[]" class="site" disabled>
                                <option value="{$usedtruck.series}">{$classify_list[$usedtruck['series']]}</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">型号</label>
                        <div class="layui-input-block">
                            <select name="pid[]" disabled>
                                <option value="{$usedtruck.version}">{$classify_list[$usedtruck['version']]}</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">车辆所在地</label>
                        <div class="layui-input-inline">
                            <select name="site[]" lay-verify="required" id="site" disabled>
                                <option value="0">全国</option>
                                {foreach name="area_list" item="vo"}
                                {if $vo.parent_id == 0}
                                <option value="{$vo.id}" {if $usedtruck.site[0] == $vo.id}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                        <div class="layui-input-inline">
                            <select name="site[]" lay-verify="required" id="site_son" disabled>
                                <option value="0">全省</option>
                                {foreach name="area_list" item="vo"}
                                {if $vo.parent_id == $usedtruck.site[0]}
                                <option value="{$vo.id}" {if $usedtruck.site[1] == $vo.id}selected="selected"{/if}>{$vo.name}</option>
                                {/if}
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">表显里程</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$usedtruck.mileage}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">价格(万)</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$usedtruck.price}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">降价金额(万)</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$usedtruck.low_price}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">购买方式</label>
                        <div class="layui-input-block">
                            <input type="text" value="{if $usedtruck.methodtype == 1}全款{else /}分期{/if}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">上牌时间</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$usedtruck.apply_time}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="padding-left: 0;width: 95px;">强险过期时间</label>
                        <div class="layui-input-block">
                            <input type="text" value="{$usedtruck.past_time}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">卖家附言</label>
                        <div class="layui-input-block">
                            <textarea name="content" class="layui-textarea" disabled>{$usedtruck.content}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">图集</label>
                        <div class="layui-input-block">
                            {if condition="!empty($usedtruck['photo'])"}
                            {foreach name="$usedtruck['photo']" item="vo"}
                            <div class="photo-list">
                                <input type="text" name="photo[]" value="{$vo}" class="layui-input" disabled>
                            </div>
                            {/foreach}
                            {/if}
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">查看次数</label>
                        <div class="layui-input-block">
                            <input type="text" name="reading" value="{$usedtruck.reading}" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">置顶</label>
                        <div class="layui-input-block">
                            <input type="text" value="{if $usedtruck.is_top == 1}置顶{else /}未置顶{/if}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="text" value="{if $usedtruck.status == 1}已审核{else /}未审核{/if}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">推荐</label>
                        <div class="layui-input-block">
                            <input type="text" value="{if $usedtruck.is_recommend == 1}推荐{else /}未推荐{/if}" required  lay-verify="required" class="layui-input" disabled>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a href="{:url('admin/UsedTruck/index',['coding'=>$usedtruck['coding']])}" class="layui-btn layui-btn-normal">信息管理</a>
                            {if $usedtruck.deal == 1}<a href="{:url('admin/UsedDeal/index',['coding'=>$usedtruck['coding']])}" class="layui-btn layui-btn-normal">交易信息</a>{/if}
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}